// * 文件上传模块
export namespace Upload {
	export interface ResFileUrl {
		url: string;
		full_url: string;
	}
	export namespace Dir {
		export interface Form {
			dir_name: string;
			is_common: 1 | 0;
			dir_pid: string;
			dir_sort: number;
		}

		export interface All extends Form {
			dir_id: string;
			children?: All[]
		}
	}

	export namespace File {
		export type FileLists = { file_name: string; file_type: string; size: number };

		export interface FirstReq {
			file_list: FileLists[];
			is_common: 1 | 0;
			dir_id: number;
		}

		export interface StsMsgReq{
			  num:number;
		}
		export interface StsMsg {
			uuid: string;
		}

		export interface FollowUpReq {
			file: File;
			oid: string;
		}
		export interface FollowUpRes {
			uploadNum: number; //上传次数
		}
		export interface FirstRes {
			file_list: Array<{ oid: string; slice_size: number }>;
		}

		export interface UploadConfig{
			upload_file_type: Array<FileTypes>;
			upload_max_size: number;
			upload_check_file_type: 1 | 0;
			upload_slice_size: number;
			// common_dir_prefix: string;
			// admins_dir_prefix: string;
		}

		export interface DirPrefix{
			common:string;
			admins:string;
		}

		export interface OssConfig{
			timeout: number;
			oss_start: 1 | 0;
			oss_bucket: string;
			accessKeyId: string;
			accessKeySecret: string;
			securityToken: string;
		}

		export interface GetConfig {
		   	upload: UploadConfig;
			  dir_prefix: DirPrefix;
		  	admins_id:string;
			  oss?: OssConfig;
		}
	}
}
